﻿using Microsoft.AspNetCore.SignalR;

using PLCS.Domain.Equipments;

using Volo.Abp.AspNetCore.SignalR;

namespace PLCS.Application.EquipmentApp.Hubs;

public class ConveyorLineHub : AbpHub
{
    private readonly IEquipmentRepository _repository;

    public ConveyorLineHub(IEquipmentRepository repository)
    {
        _repository = repository;
    }

    public async Task InitalStatus(string name)
    {
        await Task.Run(async () =>
        {
            Equipment station = await _repository.FindAsync(x => x.EquName == name);
            if (station != null)
            {
                //await Clients.Caller.SendAsync("ChangeStatus", name, station.Status, station.HaveStatus);
            }
        });
    }
}